package com.example.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.bean.PageRes;
import com.example.demo.bean.SysJob;
import com.example.demo.dto.task.SysJobPageReqVO;
import com.example.demo.exception.TaskException;
import org.quartz.SchedulerException;

public interface ISysJobService extends IService<SysJob> {

    public PageRes<SysJob> list(SysJobPageReqVO sysJobPageReqVO);

    public int changeStatus(SysJob sysJob) throws SchedulerException;

    public int resumeJob(SysJob sysJob) throws SchedulerException;

    public int pauseJob(SysJob sysJob) throws SchedulerException;

    public int insert(SysJob sysJob) throws SchedulerException, TaskException;

    public int update(SysJob sysJob) throws SchedulerException, TaskException;

    public SysJob getSysJob(SysJob sysJob);

    public int deleteSysJob(Long[] jobIds) throws SchedulerException;

    public boolean run(SysJob sysJob) throws SchedulerException;
}
